package com.jcfy.project.module.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jcfy.framework.aspectj.lang.annotation.Excel;
import com.jcfy.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 用户对象 t_user
 *
 * @author jiangfeng
 * @date 2020-08-05
 */
public class TUser extends BaseEntity {
    private static final long serialVersionUID=1L;

    /** 用户id */
    private Long userId;

    /** 用户类型(1：普通用户)，可扩展 */
    @Excel(name = "用户类型(1：普通用户)，可扩展" )
    private Integer type;

    /** 用户名 */
    @Excel(name = "用户名" )
    private String userName;

    /** 登录密码 */
    @Excel(name = "登录密码" )
    private String pwd;

    /** 手机号 */
    @Excel(name = "手机号" )
    private String mobile;

    /** 用户头像 */
    @Excel(name = "用户头像" )
    private String userIcon;

    /** 用户编号 */
    @Excel(name = "用户编号" )
    private String userNo;

    /** 昵称 */
    @Excel(name = "昵称" )
    private String nickName;

    /** 出生日期 */
    @JsonFormat(pattern = "yyyy-MM-dd" )
    @Excel(name = "出生日期" , width = 30, dateFormat = "yyyy-MM-dd" )
    private Date birthDate;

    /** 性别 */
    @Excel(name = "性别" )
    private Integer sex;

    /** 公众号openId */
    @Excel(name = "公众号openId" )
    private String openid;

    /** 小程序openId */
    @Excel(name = "小程序openId" )
    private String miniOpenid;

    /** 登陆token */
    @Excel(name = "登陆token" )
    private String token;

    /** token失效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd" )
    @Excel(name = "token失效时间" , width = 30, dateFormat = "yyyy-MM-dd" )
    private Date tokenDate;

    /** 账户状态 */
    @Excel(name = "账户状态" )
    private Integer status;

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }
    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getType() {
        return type;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }
    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getPwd() {
        return pwd;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getMobile() {
        return mobile;
    }
    public void setUserIcon(String userIcon) {
        this.userIcon = userIcon;
    }

    public String getUserIcon() {
        return userIcon;
    }
    public void setUserNo(String userNo) {
        this.userNo = userNo;
    }

    public String getUserNo() {
        return userNo;
    }
    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getNickName() {
        return nickName;
    }
    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    public Date getBirthDate() {
        return birthDate;
    }
    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Integer getSex() {
        return sex;
    }
    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getOpenid() {
        return openid;
    }
    public void setMiniOpenid(String miniOpenid) {
        this.miniOpenid = miniOpenid;
    }

    public String getMiniOpenid() {
        return miniOpenid;
    }
    public void setToken(String token) {
        this.token = token;
    }

    public String getToken() {
        return token;
    }
    public void setTokenDate(Date tokenDate) {
        this.tokenDate = tokenDate;
    }

    public Date getTokenDate() {
        return tokenDate;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    @Override
    public String toString(){
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("userId" ,getUserId())
            .append("type" ,getType())
            .append("userName" ,getUserName())
            .append("pwd" ,getPwd())
            .append("mobile" ,getMobile())
            .append("userIcon" ,getUserIcon())
            .append("userNo" ,getUserNo())
            .append("nickName" ,getNickName())
            .append("birthDate" ,getBirthDate())
            .append("sex" ,getSex())
            .append("openid" ,getOpenid())
            .append("miniOpenid" ,getMiniOpenid())
            .append("createTime" ,getCreateTime())
            .append("updateTime" ,getUpdateTime())
            .append("token" ,getToken())
            .append("tokenDate" ,getTokenDate())
            .append("status" ,getStatus())
            .toString();
    }
}
